package com.example.backend.controller;

import com.example.backend.common.result.Result;
import com.example.backend.dto.StatsDTO;
import com.example.backend.service.StatsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stats")
public class StatsController {
    
    private final StatsService statsService;
    
    public StatsController(StatsService statsService) {
        this.statsService = statsService;
    }
    
    @GetMapping
    public Result<StatsDTO> getStats() {
        StatsDTO stats = statsService.getStats();
        return Result.success(stats);
    }
} 